Image encoding/decoding method and apparatus for determining prediction mode of chroma block by referring to luma sample position, and method for transmitting bitstream

ABSTRACT

An image encoding/decoding method and apparatus are provided. An image decoding method performed by an image decoding apparatus may comprise identifying a current chroma block by splitting an image, identifying whether a matrix based intra prediction mode applies to a first luma sample position corresponding to the current chroma block, identifying whether a predetermined prediction mode applies to a second luma sample position corresponding to the current chroma block, based on the matrix based intra prediction mode doing not apply, and determining an intra prediction mode candidate of the current chroma block based on an intra prediction mode applying to a third luma sample position corresponding to the current chroma block, based on the predetermined prediction mode doing not apply.

TECHNICAL FIELD

The present disclosure relates to an image encoding/decoding method andapparatus, and, more particularly, to an image encoding/decoding methodand apparatus for determining an intra prediction mode of a chromablock, and a method of transmitting a bitstream generated by the imageencoding method/apparatus of the present disclosure.

BACKGROUND ART

Recently, demand for high-resolution and high-quality images such ashigh definition (HD) images and ultra high definition (UHD) images isincreasing in various fields. As resolution and quality of image dataare improved, the amount of transmitted information or bits relativelyincreases as compared to existing image data. An increase in the amountof transmitted information or bits causes an increase in transmissioncost and storage cost.

Accordingly, there is a need for high-efficient image compressiontechnology for effectively transmitting, storing and reproducinginformation on high-resolution and high-quality images.

DISCLOSURE Technical Problem

An object of the present disclosure is to provide an imageencoding/decoding method and apparatus with improved encoding/decodingefficiency.

An object of the present disclosure is to provide an imageencoding/decoding method and apparatus for improving encoding/decodingefficiency by determining a prediction mode of a chroma block byreferring to a smaller number of luma sample positions.

Another object of the present disclosure is to provide a method oftransmitting a bitstream generated by an image encoding method orapparatus according to the present disclosure.

Another object of the present disclosure is to provide a recordingmedium storing a bitstream generated by an image encoding method orapparatus according to the present disclosure.

Another object of the present disclosure is to provide a recordingmedium storing a bitstream received, decoded and used to reconstruct animage by an image decoding apparatus according to the presentdisclosure.

The technical problems solved by the present disclosure are not limitedto the above technical problems and other technical problems which arenot described herein will become apparent to those skilled in the artfrom the following description.

Technical Solution

An image decoding method performed by an image decoding apparatusaccording to an aspect of the present disclosure may compriseidentifying a current chroma block by splitting an image, identifyingwhether a matrix based intra prediction mode applies to a first lumasample position corresponding to the current chroma block, identifyingwhether a predetermined prediction mode applies to a second luma sampleposition corresponding to the current chroma block, based on the matrixbased intra prediction mode not being applied, and determining an intraprediction mode candidate of the current chroma block based on an intraprediction mode applying to a third luma sample position correspondingto the current chroma block, based on the predetermined prediction modenot being applied. The predetermined prediction mode is an IBC (intrablock copy) mode or a palette mode.

The first luma sample position may be determined based on at least oneof a width or height of a luma block corresponding to the current chromablock. The first luma sample position may be determined based on atop-left sample position of a luma block corresponding to the currentchroma block, a width of the luma block and a height of the luma block.The first luma sample position may be the same as the third luma sampleposition.

The second luma sample position may be determined based on at least oneof a width or height of a luma block corresponding to the current chromablock. The second luma sample position may be determined based on atop-left sample position of a luma block corresponding to the currentchroma block, a width of the luma block and a height of the luma block.The second luma sample position may be the same as the third luma sampleposition.

The first luma sample position, the second luma sample position and thethird luma sample position may be the same.

The first luma sample position may be a center position of a luma blockcorresponding to the current chroma block. An x component position ofthe first luma sample position may be determined by adding half thewidth of the luma block to an x component position of a top-left sampleof a luma block corresponding to the current chroma block, and a ycomponent position of the first luma sample position may be determinedby adding half the height of the luma block to a y component position ofthe top-left sample of the luma block corresponding to the currentchroma block.

The first luma sample position, the second luma sample position and thethird luma sample position may be determined based on a top-left sampleposition of a luma block corresponding to the current chroma block, awidth of the luma block and a height of the luma block, respectively.

In addition, an image decoding apparatus according to an aspect of thepresent disclosure may comprise a memory and at least one processor. Theat least one processor may identify a current chroma block by splittingan image, identify whether a matrix based intra prediction mode appliesto a first luma sample position corresponding to the current chromablock, identify whether a predetermined prediction mode applies to asecond luma sample position corresponding to the current chroma block,based on the matrix based intra prediction mode not being applied, anddetermine an intra prediction mode candidate of the current chroma blockbased on an intra prediction mode applying to a third luma sampleposition corresponding to the current chroma block, based on thepredetermined prediction mode not being applied.

In addition, an image encoding method performed by an image encodingapparatus according to an aspect of the present disclosure may compriseidentifying a current chroma block by splitting an image, identifyingwhether a matrix based intra prediction mode applies to a first lumasample position corresponding to the current chroma block, identifyingwhether a predetermined prediction mode applies to a second luma sampleposition corresponding to the current chroma block, based on the matrixbased intra prediction mode not being applied, and determining an intraprediction mode candidate of the current chroma block based on an intraprediction mode applying to a third luma sample position correspondingto the current chroma block, based on the predetermined prediction modenot being applied.

In addition, a transmission method according to another aspect of thepresent disclosure may transmit a bitstream generated by the imageencoding apparatus or the image encoding method of the presentdisclosure.

In addition, a computer-readable recording medium according to anotheraspect of the present disclosure may store the bitstream generated bythe image encoding apparatus or the image encoding method of the presentdisclosure.

The features briefly summarized above with respect to the presentdisclosure are merely exemplary aspects of the detailed descriptionbelow of the present disclosure, and do not limit the scope of thepresent disclosure.

Advantageous Effects

According to the present disclosure, it is possible to provide an imageencoding/decoding method and apparatus with improved encoding/decodingefficiency.

Also, according to the present disclosure, it is possible to provide animage encoding/decoding method and apparatus for improvingencoding/decoding efficiency by determining a prediction mode of achroma block by referring to a smaller number of luma sample positions.

Also, according to the present disclosure, it is possible to provide amethod of transmitting a bitstream generated by an image encoding methodor apparatus according to the present disclosure.

Also, according to the present disclosure, it is possible to provide arecording medium storing a bitstream generated by an image encodingmethod or apparatus according to the present disclosure.

Also, according to the present disclosure, it is possible to provide arecording medium storing a bitstream received, decoded and used toreconstruct an image by an image decoding apparatus according to thepresent disclosure.

It will be appreciated by persons skilled in the art that that theeffects that can be achieved through the present disclosure are notlimited to what has been particularly described hereinabove and otheradvantages of the present disclosure will be more clearly understoodfrom the detailed description.

DESCRIPTION OF DRAWINGS

FIG. 1 is a view schematically showing a video coding system, to whichan embodiment of the present disclosure is applicable.

FIG. 2 is a view schematically showing an image encoding apparatus, towhich an embodiment of the present disclosure is applicable.

FIG. 3 is a view schematically showing an image decoding apparatus, towhich an embodiment of the present disclosure is applicable.

FIG. 4 is a view showing a partitioning structure of an image accordingto an embodiment.

FIG. 5 is a view showing an embodiment of a partitioning type of a blockaccording to a multi-type tree structure.

FIG. 6 is a view showing a signaling mechanism of block splittinginformation in a quadtree with nested multi-type tree structureaccording to the present disclosure.

FIG. 7 is a view showing an embodiment in which a CTU is partitionedinto multiple CUs.

FIG. 8 is a view illustrating an embodiment of a redundant splittingpattern.

FIGS. 9 to 11 are views illustrating a positional relationship between aluma sample and a chroma sample determined according to a chroma formataccording to an embodiment.

FIG. 12 is a view illustrating syntax for chroma format signalingaccording to an embodiment.

FIG. 13 is a view illustrating a chroma format classification tableaccording to an embodiment.

FIGS. 14 and 15 are views illustrating a directional intra predictionmode according to an embodiment.

FIGS. 16 and 17 are reference views illustrating an MIP mode accordingto an embodiment.

FIG. 18 is a view illustrating an embodiment of horizontal scan andvertical scan according to an embodiment.

FIG. 19 is a view illustrating an intra prediction mode determinationmethod of a chroma block according to an embodiment.

FIGS. 20 and 21 are views illustrating a reference table for determininga chroma intra prediction mode.

FIGS. 22 to 25 are flowcharts illustrating a luma intra prediction modeinformation determination method according to an embodiment.

FIG. 26 is a flowchart illustrating a method of performing encoding anddecoding according to an embodiment by an encoding apparatus and adecoding apparatus according to an embodiment.

FIG. 27 is a view showing a content streaming system, to which anembodiment of the present disclosure is applicable.

MODE FOR INVENTION

Hereinafter, the embodiments of the present disclosure will be describedin detail with reference to the accompanying drawings so as to be easilyimplemented by those skilled in the art. However, the present disclosuremay be implemented in various different forms, and is not limited to theembodiments described herein.

In describing the present disclosure, if it is determined that thedetailed description of a related known function or construction rendersthe scope of the present disclosure unnecessarily ambiguous, thedetailed description thereof will be omitted. In the drawings, parts notrelated to the description of the present disclosure are omitted, andsimilar reference numerals are atached to similar parts.

In the present disclosure, when a component is “connected”, “coupled” or“linked” to another component, it may include not only a directconnection relationship but also an indirect connection relationship inwhich an intervening component is present. In addition, when a component“includes” or “has” other components, it means that other components maybe further included, rather than excluding other components unlessotherwise stated.

In the present disclosure, the terms first, second, etc. may be usedonly for the purpose of distinguishing one component from othercomponents, and do not limit the order or importance of the componentsunless otherwise stated. Accordingly, within the scope of the presentdisclosure, a first component in one embodiment may be referred to as asecond component in another embodiment, and similarly, a secondcomponent in one embodiment may be referred to as a first component inanother embodiment.

In the present disclosure, components that are distinguished from eachother are intended to clearly describe each feature, and do not meanthat the components are necessarily separated. That is, a plurality ofcomponents may be integrated and implemented in one hardware or softwareunit, or one component may be distributed and implemented in a pluralityof hardware or software units. Therefore, even if not stated otherwise,such embodiments in which the components are integrated or the componentis distributed are also included in the scope of the present disclosure.

In the present disclosure, the components described in variousembodiments do not necessarily mean essential components, and somecomponents may be optional components. Accordingly, an embodimentconsisting of a subset of components described in an embodiment is alsoincluded in the scope of the present disclosure. In addition,embodiments including other components in addition to componentsdescribed in the various embodiments are included in the scope of thepresent disclosure.

The present disclosure relates to encoding and decoding of an image, andterms used in the present disclosure may have a general meaning commonlyused in the technical field, to which the present disclosure belongs,unless newly defined in the present disclosure.

In the present disclosure, a “picture” generally refers to a unitrepresenting one image in a specific time period, and a slice/tile is acoding unit constituting a part of a picture, and one picture may becomposed of one or more slices/tiles. In addition, a slice/tile mayinclude one or more coding tree units (CTUs).

In the present disclosure, a “pixel” or a “pel” may mean a smallest unitconstituting one picture (or image). In addition, “sample” may be usedas a term corresponding to a pixel. A sample may generally represent apixel or a value of a pixel, and may represent only a pixel/pixel valueof a luma component or only a pixel/pixel value of a chroma component.

In the present disclosure, a “unit” may represent a basic unit of imageprocessing. The unit may include at least one of a specific region ofthe picture and information related to the region. The unit may be usedinterchangeably with terms such as “sample array”, “block” or “area” insome cases. In a general case, an M×N block may include samples (orsample arrays) or a set (or array) of transform coefficients of Mcolumns and N rows.

In the present disclosure, “current block” may mean one of “currentcoding block”, “current coding unit”, “coding target block”, “decodingtarget block” or “processing target block”. When prediction isperformed, “current block” may mean “current prediction block” or“prediction target block”. When transform (inversetransform)/quantization (dequantization) is performed, “current block”may mean “current transform block” or “transform target block”. Whenfiltering is performed, “current block” may mean “filtering targetblock”.

In addition, in the present disclosure, a “current block” may mean “aluma block of a current block” unless explicitly stated as a chromablock. The “chroma block of the current block” may be expressed byincluding an explicit description of a chroma block, such as “chromablock” or “current chroma block”.

In the present disclosure, the term “/” and “,” should be interpreted toindicate “and/or.” For instance, the expression “A/B” and “A, B” maymean “A and/or B.” Further, “A/B/C” and “A/B/C” may mean “at least oneof A, B, and/or C.”

In the present disclosure, the term “or” should be interpreted toindicate “and/or.” For instance, the expression “A or B” may comprise 1)only “A”, 2) only “B”, and/or 3) both “A and B”. In other words, in thepresent disclosure, the term “or” should be interpreted to indicate“additionally or alternatively.”

Overview of Video Coding System

FIG. 1 is a view showing a video coding system according to the presentdisclosure.

The video coding system according to an embodiment may include aencoding apparatus 10 and a decoding apparatus 20. The encodingapparatus 10 may deliver encoded video and/or image information or datato the decoding apparatus 20 in the form of a file or streaming via adigital storage medium or network.

The encoding apparatus 10 according to an embodiment may include a videosource generator 11, an encoding unit 12 and a transmitter 13. Thedecoding apparatus 20 according to an embodiment may include a receiver21, a decoding unit 22 and a renderer 23. The encoding unit 12 may becalled a video/image encoding unit, and the decoding unit 22 may becalled a video/image decoding unit. The transmitter 13 may be includedin the encoding unit 12. The receiver 21 may be included in the decodingunit 22. The renderer 23 may include a display and the display may beconfigured as a separate device or an external component.

The video source generator 11 may acquire a video/image through aprocess of capturing, synthesizing or generating the video/image. Thevideo source generator 11 may include a video/image capture deviceand/or a video/image generating device. The video/image capture devicemay include, for example, one or more cameras, video/image archivesincluding previously captured video/images, and the like. Thevideo/image generating device may include, for example, computers,tablets and smartphones, and may (electronically) generate video/images.For example, a virtual video/image may be generated through a computeror the like. In this case, the video/image capturing process may bereplaced by a process of generating related data.

The encoding unit 12 may encode an input video/image. The encoding unit12 may perform a series of procedures such as prediction, transform, andquantization for compression and coding efficiency. The encoding unit 12may output encoded data (encoded video/image information) in the form ofa bitstream.

The transmitter 13 may transmit the encoded video/image information ordata output in the form of a bitstream to the receiver 21 of thedecoding apparatus 20 through a digital storage medium or a network inthe form of a file or streaming. The digital storage medium may includevarious storage mediums such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, andthe like. The transmitter 13 may include an element for generating amedia file through a predetermined file format and may include anelement for transmission through a broadcast/communication network. Thereceiver 21 may extract/receive the bitstream from the storage medium ornetwork and transmit the bitstream to the decoding unit 22.

The decoding unit 22 may decode the video/image by performing a seriesof procedures such as dequantization, inverse transform, and predictioncorresponding to the operation of the encoding unit 12.

The renderer 23 may render the decoded video/image. The renderedvideo/image may be displayed through the display.

Overview of Image Encoding Apparatus

FIG. 2 is a view schematically showing an image encoding apparatus, towhich an embodiment of the present disclosure is applicable.

As shown in FIG. 2 , the image encoding apparatus 100 may include animage partitioner 110, a subtractor 115, a transformer 120, a quantizer130, a dequantizer 140, an inverse transformer 150, an adder 155, afilter 160, a memory 170, an inter prediction unit 180, an intraprediction unit 185 and an entropy encoder 190. The inter predictionunit 180 and the intra prediction unit 185 may be collectively referredto as a “prediction unit”. The transformer 120, the quantizer 130, thedequantizer 140 and the inverse transformer 150 may be included in aresidual processor. The residual processor may further include thesubtractor 115.

All or at least some of the plurality of components configuring theimage encoding apparatus 100 may be configured by one hardware component(e.g., an encoder or a processor) in some embodiments. In addition, thememory 170 may include a decoded picture buffer (DPB) and may beconfigured by a digital storage medium.

The image partitioner 110 may partition an input image (or a picture ora frame) input to the image encoding apparatus 100 into one or moreprocessing units. For example, the processing unit may be called acoding unit (CU). The coding unit may be acquired by recursivelypartitioning a coding tree unit (CTU) or a largest coding unit (LCU)according to a quad-tree binary-tree ternary-tree (QT/BT/TT) structure.For example, one coding unit may be partitioned into a plurality ofcoding units of a deeper depth based on a quad tree structure, a binarytree structure, and/or a ternary structure. For partitioning of thecoding unit, a quad tree structure may be applied first and the binarytree structure and/or ternary structure may be applied later. The codingprocedure according to the present disclosure may be performed based onthe final coding unit that is no longer partitioned. The largest codingunit may be used as the final coding unit or the coding unit of deeperdepth acquired by partitioning the largest coding unit may be used asthe final coding unit. Here, the coding procedure may include aprocedure of prediction, transform, and reconstruction, which will bedescribed later. As another example, the processing unit of the codingprocedure may be a prediction unit (PU) or a transform unit (TU). Theprediction unit and the transform unit may be split or partitioned fromthe final coding unit. The prediction unit may be a unit of sampleprediction, and the transform unit may be a unit for deriving atransform coefficient and/or a unit for deriving a residual signal fromthe transform coefficient.

The prediction unit (the inter prediction unit 180 or the intraprediction unit 185) may perform prediction on a block to be processed(current block) and generate a predicted block including predictionsamples for the current block. The prediction unit may determine whetherintra prediction or inter prediction is applied on a current block or CUbasis. The prediction unit may generate various information related toprediction of the current block and transmit the generated informationto the entropy encoder 190. The information on the prediction may beencoded in the entropy encoder 190 and output in the form of abitstream.

The intra prediction unit 185 may predict the current block by referringto the samples in the current picture. The referred samples may belocated in the neighborhood of the current block or may be located apartaccording to the intra prediction mode and/or the intra predictiontechnique. The intra prediction modes may include a plurality ofnon-directional modes and a plurality of directional modes. Thenon-directional mode may include, for example, a DC mode and a planarmode. The directional mode may include, for example, 33 directionalprediction modes or 65 directional prediction modes according to thedegree of detail of the prediction direction. However, this is merely anexample, more or less directional prediction modes may be used dependingon a setting. The intra prediction unit 185 may determine the predictionmode applied to the current block by using a prediction mode applied toa neighboring block.

The inter prediction unit 180 may derive a predicted block for thecurrent block based on a reference block (reference sample array)specified by a motion vector on a reference picture. In this case, inorder to reduce the amount of motion information transmitted in theinter prediction mode, the motion information may be predicted in unitsof blocks, subblocks, or samples based on correlation of motioninformation between the neighboring block and the current block. Themotion information may include a motion vector and a reference pictureindex. The motion information may further include inter predictiondirection (L0 prediction, L1 prediction, Bi prediction, etc.)information. In the case of inter prediction, the neighboring block mayinclude a spatial neighboring block present in the current picture and atemporal neighboring block present in the reference picture. Thereference picture including the reference block and the referencepicture including the temporal neighboring block may be the same ordifferent. The temporal neighboring block may be called a collocatedreference block, a co-located CU (colCU), and the like. The referencepicture including the temporal neighboring block may be called acollocated picture (colPic). For example, the inter prediction unit 180may configure a motion information candidate list based on neighboringblocks and generate information specifying which candidate is used toderive a motion vector and/or a reference picture index of the currentblock. Inter prediction may be performed based on various predictionmodes. For example, in the case of a skip mode and a merge mode, theinter prediction unit 180 may use motion information of the neighboringblock as motion information of the current block. In the case of theskip mode, unlike the merge mode, the residual signal may not betransmitted. In the case of the motion vector prediction (MVP) mode, themotion vector of the neighboring block may be used as a motion vectorpredictor, and the motion vector of the current block may be signaled byencoding a motion vector difference and an indicator for a motion vectorpredictor. The motion vector difference may mean a difference betweenthe motion vector of the current block and the motion vector predictor.

The prediction unit may generate a prediction signal based on variousprediction methods and prediction techniques described below. Forexample, the prediction unit may not only apply intra prediction orinter prediction but also simultaneously apply both intra prediction andinter prediction, in order to predict the current block. A predictionmethod of simultaneously applying both intra prediction and interprediction for prediction of the current block may be called combinedinter and intra prediction (CIIP). In addition, the prediction unit mayperform intra block copy (IBC) for prediction of the current block.Intra block copy may be used for content image/video coding of a game orthe like, for example, screen content coding (SCC). IBC is a method ofpredicting a current picture using a previously reconstructed referenceblock in the current picture at a location apart from the current blockby a predetermined distance. When IBC is applied, the location of thereference block in the current picture may be encoded as a vector (blockvector) corresponding to the predetermined distance. IBC basicallyperforms prediction in the current picture, but may be performedsimilarly to inter prediction in that a reference block is derivedwithin the current picture. That is, IBC may use at least one of theinter prediction techniques described in the present disclosure.

The prediction signal generated by the prediction unit may be used togenerate a reconstructed signal or to generate a residual signal. Thesubtractor 115 may generate a residual signal (residual block orresidual sample array) by subtracting the prediction signal (predictedblock or prediction sample array) output from the prediction unit fromthe input image signal (original block or original sample array). Thegenerated residual signal may be transmitted to the transformer 120.

The transformer 120 may generate transform coefficients by applying atransform technique to the residual signal. For example, the transformtechnique may include at least one of a discrete cosine transform (DCT),a discrete sine transform (DST), a karhunen-loeve transform (KLT), agraph-based transform (GBT), or a conditionally non-linear transform(CNT). Here, the GBT means transform obtained from a graph whenrelationship information between pixels is represented by the graph. TheCNT refers to transform acquired based on a prediction signal generatedusing all previously reconstructed pixels. In addition, the transformprocess may be applied to square pixel blocks having the same size ormay be applied to blocks having a variable size rather than square.

The quantizer 130 may quantize the transform coefficients and transmitthem to the entropy encoder 190. The entropy encoder 190 may encode thequantized signal (information on the quantized transform coefficients)and output a bitstream. The information on the quantized transformcoefficients may be referred to as residual information. The quantizer130 may rearrange quantized transform coefficients in a block form intoa one-dimensional vector form based on a coefficient scanning order andgenerate information on the quantized transform coefficients based onthe quantized transform coefficients in the one-dimensional vector form.

The entropy encoder 190 may perform various encoding methods such as,for example, exponential Golomb, context-adaptive variable length coding(CAVLC), context-adaptive binary arithmetic coding (CABAC), and thelike. The entropy encoder 190 may encode information necessary forvideo/image reconstruction other than quantized transform coefficients(e.g., values of syntax elements, etc.) together or separately. Encodedinformation (e.g., encoded video/image information) may be transmittedor stored in units of network abstraction layers (NALs) in the form of abitstream. The video/image information may further include informationon various parameter sets such as an adaptation parameter set (APS), apicture parameter set (PPS), a sequence parameter set (SPS), or a videoparameter set (VPS). In addition, the video/image information mayfurther include general constraint information. The signaledinformation, transmitted information and/or syntax elements described inthe present disclosure may be encoded through the above-describedencoding procedure and included in the bitstream.

The bitstream may be transmitted over a network or may be stored in adigital storage medium. The network may include a broadcasting networkand/or a communication network, and the digital storage medium mayinclude various storage media such as USB, SD, CD, DVD, Blu-ray, HDD,SSD, and the like. A transmitter (not shown) transmitting a signaloutput from the entropy encoder 190 and/or a storage unit (not shown)storing the signal may be included as internal/external element of theimage encoding apparatus 100. Alternatively, the transmitter may beprovided as the component of the entropy encoder 190.

The quantized transform coefficients output from the quantizer 130 maybe used to generate a residual signal. For example, the residual signal(residual block or residual samples) may be reconstructed by applyingdequantization and inverse transform to the quantized transformcoefficients through the dequantizer 140 and the inverse transformer150.

The adder 155 adds the reconstructed residual signal to the predictionsignal output from the inter prediction unit 180 or the intra predictionunit 185 to generate a reconstructed signal (reconstructed picture,reconstructed block, reconstructed sample array). If there is noresidual for the block to be processed, such as a case where the skipmode is applied, the predicted block may be used as the reconstructedblock. The adder 155 may be called a reconstructor or a reconstructedblock generator. The generated reconstructed signal may be used forintra prediction of a next block to be processed in the current pictureand may be used for inter prediction of a next picture through filteringas described below.

The filter 160 may improve subjective/objective image quality byapplying filtering to the reconstructed signal. For example, the filter160 may generate a modified reconstructed picture by applying variousfiltering methods to the reconstructed picture and store the modifiedreconstructed picture in the memory 170, specifically, a DPB of thememory 170. The various filtering methods may include, for example,deblocking filtering, a sample adaptive offset, an adaptive loop filter,a bilateral filter, and the like. The filter 160 may generate variousinformation related to filtering and transmit the generated informationto the entropy encoder 190 as described later in the description of eachfiltering method. The information related to filtering may be encoded bythe entropy encoder 190 and output in the form of a bitstream.

The modified reconstructed picture transmitted to the memory 170 may beused as the reference picture in the inter prediction unit 180. Wheninter prediction is applied through the image encoding apparatus 100,prediction mismatch between the image encoding apparatus 100 and theimage decoding apparatus may be avoided and encoding efficiency may beimproved.

The DPB of the memory 170 may store the modified reconstructed picturefor use as a reference picture in the inter prediction unit 180. Thememory 170 may store the motion information of the block from which themotion information in the current picture is derived (or encoded) and/orthe motion information of the blocks in the picture that have alreadybeen reconstructed. The stored motion information may be transmitted tothe inter prediction unit 180 and used as the motion information of thespatial neighboring block or the motion information of the temporalneighboring block. The memory 170 may store reconstructed samples ofreconstructed blocks in the current picture and may transfer thereconstructed samples to the intra prediction unit 185.

Overview of Image Decoding Apparatus

FIG. 3 is a view schematically showing an image decoding apparatus, towhich an embodiment of the present disclosure is applicable.

As shown in FIG. 3 , the image decoding apparatus 200 may include anentropy decoder 210, a dequantizer 220, an inverse transformer 230, anadder 235, a filter 240, a memory 250, an inter prediction unit 260 andan intra prediction unit 265. The inter prediction unit 260 and theintra prediction unit 265 may be collectively referred to as a“prediction unit”. The dequantizer 220 and the inverse transformer 230may be included in a residual processor.

All or at least some of a plurality of components configuring the imagedecoding apparatus 200 may be configured by a hardware component (e.g.,a decoder or a processor) according to an embodiment. In addition, thememory 250 may include a decoded picture buffer (DPB) or may beconfigured by a digital storage medium.

The image decoding apparatus 200, which has received a bitstreamincluding video/image information, may reconstruct an image byperforming a process corresponding to a process performed by the imageencoding apparatus 100 of FIG. 2 . For example, the image decodingapparatus 200 may perform decoding using a processing unit applied inthe image encoding apparatus. Thus, the processing unit of decoding maybe a coding unit, for example. The coding unit may be acquired bypartitioning a coding tree unit or a largest coding unit. Thereconstructed image signal decoded and output through the image decodingapparatus 200 may be reproduced through a reproducing apparatus (notshown).

The image decoding apparatus 200 may receive a signal output from theimage encoding apparatus of FIG. 2 in the form of a bitstream. Thereceived signal may be decoded through the entropy decoder 210. Forexample, the entropy decoder 210 may parse the bitstream to deriveinformation (e.g., video/image information) necessary for imagereconstruction (or picture reconstruction). The video/image informationmay further include information on various parameter sets such as anadaptation parameter set (APS), a picture parameter set (PPS), asequence parameter set (SPS), or a video parameter set (VPS). Inaddition, the video/image information may further include generalconstraint information. The image decoding apparatus may further decodepicture based on the information on the parameter set and/or the generalconstraint information. Signaled/received information and/or syntaxelements described in the present disclosure may be decoded through thedecoding procedure and obtained from the bitstream. For example, theentropy decoder 210 decodes the information in the bitstream based on acoding method such as exponential Golomb coding, CAVLC, or CABAC, andoutput values of syntax elements required for image reconstruction andquantized values of transform coefficients for residual. Morespecifically, the CABAC entropy decoding method may receive a bincorresponding to each syntax element in the bitstream, determine acontext model using a decoding target syntax element information,decoding information of a neighboring block and a decoding target blockor information of a symbol/bin decoded in a previous stage, and performarithmetic decoding on the bin by predicting a probability of occurrenceof a bin according to the determined context model, and generate asymbol corresponding to the value of each syntax element. In this case,the CABAC entropy decoding method may update the context model by usingthe information of the decoded symbol/bin for a context model of a nextsymbol/bin after determining the context model. The information relatedto the prediction among the information decoded by the entropy decoder210 may be provided to the prediction unit (the inter prediction unit260 and the intra prediction unit 265), and the residual value on whichthe entropy decoding was performed in the entropy decoder 210, that is,the quantized transform coefficients and related parameter information,may be input to the dequantizer 220. In addition, information onfiltering among information decoded by the entropy decoder 210 may beprovided to the filter 240. Meanwhile, a receiver (not shown) forreceiving a signal output from the image encoding apparatus may befurther configured as an internal/external element of the image decodingapparatus 200, or the receiver may be a component of the entropy decoder210.

Meanwhile, the image decoding apparatus according to the presentdisclosure may be referred to as a video/image/picture decodingapparatus. The image decoding apparatus may be classified into aninformation decoder (video/image/picture information decoder) and asample decoder (video/image/picture sample decoder). The informationdecoder may include the entropy decoder 210. The sample decoder mayinclude at least one of the dequantizer 220, the inverse transformer230, the adder 235, the filter 240, the memory 250, the inter predictionunit 260 or the intra prediction unit 265.

The dequantizer 220 may dequantize the quantized transform coefficientsand output the transform coefficients. The dequantizer 220 may rearrangethe quantized transform coefficients in the form of a two-dimensionalblock. In this case, the rearrangement may be performed based on thecoefficient scanning order performed in the image encoding apparatus.The dequantizer 220 may perform dequantization on the quantizedtransform coefficients by using a quantization parameter (e.g.,quantization step size information) and obtain transform coefficients.

The inverse transformer 230 may inversely transform the transformcoefficients to obtain a residual signal (residual block, residualsample array).

The prediction unit may perform prediction on the current block andgenerate a predicted block including prediction samples for the currentblock. The prediction unit may determine whether intra prediction orinter prediction is applied to the current block based on theinformation on the prediction output from the entropy decoder 210 andmay determine a specific intra/inter prediction mode (predictiontechnique).

It is the same as described in the prediction unit of the image encodingapparatus 100 that the prediction unit may generate the predictionsignal based on various prediction methods (techniques) which will bedescribed later.

The intra prediction unit 265 may predict the current block by referringto the samples in the current picture. The description of the intraprediction unit 185 is equally applied to the intra prediction unit 265.

The inter prediction unit 260 may derive a predicted block for thecurrent block based on a reference block (reference sample array)specified by a motion vector on a reference picture. In this case, inorder to reduce the amount of motion information transmitted in theinter prediction mode, motion information may be predicted in units ofblocks, subblocks, or samples based on correlation of motion informationbetween the neighboring block and the current block. The motioninformation may include a motion vector and a reference picture index.The motion information may further include inter prediction direction(L0 prediction, L1 prediction, Bi prediction, etc.) information. In thecase of inter prediction, the neighboring block may include a spatialneighboring block present in the current picture and a temporalneighboring block present in the reference picture. For example, theinter prediction unit 260 may configure a motion information candidatelist based on neighboring blocks and derive a motion vector of thecurrent block and/or a reference picture index based on the receivedcandidate selection information. Inter prediction may be performed basedon various prediction modes, and the information on the prediction mayinclude information specifying a mode of inter prediction for thecurrent block.

The adder 235 may generate a reconstructed signal (reconstructedpicture, reconstructed block, reconstructed sample array) by adding theobtained residual signal to the prediction signal (predicted block,predicted sample array) output from the prediction unit (including theinter prediction unit 260 and/or the intra prediction unit 265). Ifthere is no residual for the block to be processed, such as when theskip mode is applied, the predicted block may be used as thereconstructed block. The description of the adder 155 is equallyapplicable to the adder 235. The adder 235 may be called a reconstructoror a reconstructed block generator. The generated reconstructed signalmay be used for intra prediction of a next block to be processed in thecurrent picture and may be used for inter prediction of a next picturethrough filtering as described below.

The filter 240 may improve subjective/objective image quality byapplying filtering to the reconstructed signal. For example, the filter240 may generate a modified reconstructed picture by applying variousfiltering methods to the reconstructed picture and store the modifiedreconstructed picture in the memory 250, specifically, a DPB of thememory 250. The various filtering methods may include, for example,deblocking filtering, a sample adaptive offset, an adaptive loop filter,a bilateral filter, and the like.

The (modified) reconstructed picture stored in the DPB of the memory 250may be used as a reference picture in the inter prediction unit 260. Thememory 250 may store the motion information of the block from which themotion information in the current picture is derived (or decoded) and/orthe motion information of the blocks in the picture that have alreadybeen reconstructed. The stored motion information may be transmitted tothe inter prediction unit 260 so as to be utilized as the motioninformation of the spatial neighboring block or the motion informationof the temporal neighboring block. The memory 250 may storereconstructed samples of reconstructed blocks in the current picture andtransfer the reconstructed samples to the intra prediction unit 265.

In the present disclosure, the embodiments described in the filter 160,the inter prediction unit 180, and the intra prediction unit 185 of theimage encoding apparatus 100 may be equally or correspondingly appliedto the filter 240, the inter prediction unit 260, and the intraprediction unit 265 of the image decoding apparatus 200.

Overview of Image Partitioning

The video/image coding method according to the present disclosure may beperformed based on an image partitioning structure as follows.Specifically, the procedures of prediction, residual processing((inverse) transform, (de)quantization, etc.), syntax element coding,and filtering, which will be described later, may be performed based ona CTU, CU (and/or TU, PU) derived based on the image partitioningstructure. The image may be partitioned in block units and the blockpartitioning procedure may be performed in the image partitioner 110 ofthe encoding apparatus. The partitioning related information may beencoded by the entropy encoder 190 and transmitted to the decodingapparatus in the form of a bitstream. The entropy decoder 210 of thedecoding apparatus may derive a block partitioning structure of thecurrent picture based on the partitioning related information obtainedfrom the bitstream, and based on this, may perform a series ofprocedures (e.g., prediction, residual processing, block/picturereconstruction, in-loop filtering, etc.) for image decoding.

Pictures may be partitioned into a sequence of coding tree units (CTUs).FIG. 4 shows an example in which a picture is partitioned into CTUs. TheCTU may correspond to a coding tree block (CTB). Alternatively, the CTUmay include a coding tree block of luma samples and two coding treeblocks of corresponding chroma samples. For example, for a picture thatcontains three sample arrays, the CTU may include an N×N block of lumasamples and two corresponding blocks of chroma samples.

Overview of Partitioning of CTU

As described above, the coding unit may be acquired by recursivelypartitioning the coding tree unit (CTU) or the largest coding unit (LCU)according to a quad-tree/binary-tree/ternary-tree (QT/BT/TT) structure.For example, the CTU may be first partitioned into quadtree structures.Thereafter, leaf nodes of the quadtree structure may be furtherpartitioned by a multi-type tree structure.

Partitioning according to quadtree means that a current CU (or CTU) ispartitioned into equally four. By partitioning according to quadtree,the current CU may be partitioned into four CUs having the same widthand the same height. When the current CU is no longer partitioned intothe quadtree structure, the current CU corresponds to the leaf node ofthe quad-tree structure. The CU corresponding to the leaf node of thequadtree structure may be no longer partitioned and may be used as theabove-described final coding unit. Alternatively, the CU correspondingto the leaf node of the quadtree structure may be further partitioned bya multi-type tree structure.

FIG. 5 is a view showing an embodiment of a partitioning type of a blockaccording to a multi-type tree structure. Partitioning according to themulti-type tree structure may include two types of splitting accordingto a binary tree structure and two types of splitting according to aternary tree structure.

The two types of splitting according to the binary tree structure mayinclude vertical binary splitting (SPLIT_BT_VER) and horizontal binarysplitting (SPLIT_BT_HOR). Vertical binary splitting (SPLIT_BT_VER) meansthat the current CU is split into equally two in the vertical direction.As shown in FIG. 4 , by vertical binary splitting, two CUs having thesame height as the current CU and having a width which is half the widthof the current CU may be generated. Horizontal binary splitting(SPLIT_BT_HOR) means that the current CU is split into equally two inthe horizontal direction. As shown in FIG. 5 , by horizontal binarysplitting, two CUs having a height which is half the height of thecurrent CU and having the same width as the current CU may be generated.

Two types of splitting according to the ternary tree structure mayinclude vertical ternary splitting (SPLIT_TT_VER) and horizontal ternarysplitting (SPLIT_TT_HOR). In vertical ternary splitting (SPLIT_TT_VER),the current CU is split in the vertical direction at a ratio of 1:2:1.As shown in FIG. 5 , by vertical ternary splitting, two CUs having thesame height as the current CU and having a width which is ¼ of the widthof the current CU and a CU having the same height as the current CU andhaving a width which is half the width of the current CU may begenerated. In horizontal ternary splitting (SPLIT_TT_HOR), the currentCU is split in the horizontal direction at a ratio of 1:2:1. As shown inFIG. 5 , by horizontal ternary splitting, two CUs having a height whichis ¼ of the height of the current CU and having the same width as thecurrent CU and a CU having a height which is half the height of thecurrent CU and having the same width as the current CU may be generated.

FIG. 6 is a view showing a signaling mechanism of block splittinginformation in a quadtree with nested multi-type tree structureaccording to the present disclosure.

Here, the CTU is treated as the root node of the quadtree, and ispartitioned for the first time into a quadtree structure. Information(e.g., qt_split_flag) specifying whether quadtree splitting is performedon the current CU (CTU or node (QT_node) of the quadtree) is signaled.For example, when qt_split_flag has a first value (e.g., “1”), thecurrent CU may be quadtree-partitioned. In addition, when qt_split_flaghas a second value (e.g., “0”), the current CU is notquadtree-partitioned, but becomes the leaf node (QT_leaf_node) of thequadtree. Each quadtree leaf node may then be further partitioned intomultitype tree structures. That is, the leaf node of the quadtree maybecome the node (MTT_node) of the multi-type tree. In the multitype treestructure, a first flag (e.g., Mtt_split_cu_flag) is signaled to specifywhether the current node is additionally partitioned. If thecorresponding node is additionally partitioned (e.g., if the first flagis 1), a second flag (e.g., Mtt_split_cu_vertical_flag) may be signaledto specify the splitting direction. For example, the splitting directionmay be a vertical direction if the second flag is 1 and may be ahorizontal direction if the second flag is 0. Then, a third flag (e.g.,Mtt_split_cu_binary_flag) may be signaled to specify whether the splittype is a binary split type or a ternary split type. For example, thesplit type may be a binary split type when the third flag is 1 and maybe a ternary split type when the third flag is 0. The node of themulti-type tree acquired by binary splitting or ternary splitting may befurther partitioned into multi-type tree structures. However, the nodeof the multi-type tree may not be partitioned into quadtree structures.If the first flag is 0, the corresponding node of the multi-type tree isno longer split but becomes the leaf node (MTT_leaf_node) of themulti-type tree. The CU corresponding to the leaf node of the multi-typetree may be used as the above-described final coding unit.

Based on the mtt_split_cu_vertical_flag and themtt_split_cu_binary_flag, a multi-type tree splitting mode(MttSplitMode) of a CU may be derived as shown in Table 1 below. In thefollowing description, the multi-type tree splitting mode may bereferred to as a multi-tree splitting type or splitting type.

TABLE 1 MttSplitMode mtt_split_cu_vertical_flag mtt_split_cu_binary_flagSPLIT_TT_HOR 0 0 SPLIT_BT_HOR 0 1 SPLIT_TT_VER 1 0 SPLIT_BT_VER 1 1

FIG. 7 is a view showing an example in which a CTU is partitioned intomultiple CUs by applying a multi-type tree after applying a quadtree. InFIG. 7 , bold block edges 710 represent quadtree partitioning and theremaining edges 720 represent multitype tree partitioning. The CU maycorrespond to a coding block (CB). In an embodiment, the CU may includea coding block of luma samples and two coding blocks of chroma samplescorresponding to the luma samples. A chroma component (sample) CB or TBsize may be derived based on a luma component (sample) CB or TB sizeaccording to the component ratio according to the color format (chromaformat, e.g., 4:4:4, 4:2:2, 4:2:0 or the like) of the picture/image. Incase of 4:4:4 color format, the chroma component CB/TB size may be setequal to be luma component CB/TB size. In case of 4:2:2 color format,the width of the chroma component CB/TB may be set to half the width ofthe luma component CB/TB and the height of the chroma component CB/TBmay be set to the height of the luma component CB/TB. In case of 4:2:0color format, the width of the chroma component CB/TB may be set to halfthe width of the luma component CB/TB and the height of the chromacomponent CB/TB may be set to half the height of the luma componentCB/TB.

In an embodiment, when the size of the CTU is 128 based on the lumasample unit, the size of the CU may have a size from 128×128 to 4×4which is the same size as the CTU. In one embodiment, in case of 4:2:0color format (or chroma format), a chroma CB size may have a size from64×64 to 2×2.

Meanwhile, in an embodiment, the CU size and the TU size may be thesame. Alternatively, there may be a plurality of TUs in a CU region. TheTU size generally represents a luma component (sample) transform block(TB) size.

The TU size may be derived based a largest allowable TB size maxTbSizewhich is a predetermined value. For example, when the CU size is greaterthan maxTbSize, a plurality of TUs (TBs) having maxTbSize may be derivedfrom the CU and transform/inverse transform may be performed in units ofTU (TB). For example, the largest allowable luma TB size may be 64×64and the largest allowable chroma TB size may be 32×32. If the width orheight of the CB partitioned according to the tree structure is largerthan the largest transform width or height, the CB may be automatically(or implicitly) partitioned until the TB size limit in the horizontaland vertical directions is satisfied.

In addition, for example, when intra prediction is applied, an intraprediction mode/type may be derived in units of CU (or CB) and aneighboring reference sample derivation and prediction sample generationprocedure may be performed in units of TU (or TB). In this case, theremay be one or a plurality of TUs (or TBs) in one CU (or CB) region and,in this case, the plurality of TUs or (TBs) may share the same intraprediction mode/type.

Meanwhile, for a quadtree coding tree scheme with nested multitype tree,the following parameters may be signaled as SPS syntax elements from theencoding apparatus to the decoding apparatus. For example, at least oneof a CTU size which is a parameter representing the root node size of aquadtree, MinQTSize which is a parameter representing the minimumallowed quadtree leaf node size, MaxBtSize which is a parameterrepresenting the maximum allowed binary tree root node size, MaxTtSizewhich is a parameter representing the maximum allowed ternary tree rootnode size, MaxMttDepth which is a parameter representing the maximumallowed hierarchy depth of multi-type tree splitting from a quadtreeleaf node, MinBtSize which is a parameter representing the minimumallowed binary tree leaf node size, or MinTtSize which is a parameterrepresenting the minimum allowed ternary tree leaf node size issignaled.

As an embodiment of using 4:2:0 chroma format, the CTU size may be setto 128×128 luma blocks and two 64×64 chroma blocks corresponding to theluma blocks. In this case, MinOTSize may be set to 16×16, MaxBtSize maybe set to 128×128, MaxTtSzie may be set to 64×64, MinBtSize andMinTtSize may be set to 4×4, and MaxMttDepth may be set to 4. Quadtreepartitioning may be applied to the CTU to generate quadtree leaf nodes.The quadtree leaf node may be called a leaf QT node. Quadtree leaf nodesmay have a size from a 16×16 size (e.g., the MinOTSize) to a 128×128size (e.g., the CTU size). If the leaf QT node is 128×128, it may not beadditionally partitioned into a binary tree/ternary tree. This isbecause, in this case, even if partitioned, it exceeds MaxBtsize andMaxTtszie (e.g., 64×64). In other cases, leaf QT nodes may be furtherpartitioned into a multitype tree. Therefore, the leaf QT node is theroot node for the multitype tree, and the leaf QT node may have amultitype tree depth (mttDepth) 0 value. If the multitype tree depthreaches MaxMttdepth (e.g., 4), further partitioning may not beconsidered further. If the width of the multitype tree node is equal toMinBtSize and less than or equal to 2×MinTtSize, then no furtherhorizontal partitioning may be considered. If the height of themultitype tree node is equal to MinBtSize and less than or equal to2×MinTtSize, no further vertical partitioning may be considered. Whenpartitioning is not considered, the encoding apparatus may skipsignaling of partitioning information. In this case, the decodingapparatus may derive partitioning information with a predeterminedvalue.

Meanwhile, one CTU may include a coding block of luma samples(hereinafter referred to as a “luma block”) and two coding blocks ofchroma samples corresponding thereto (hereinafter referred to as “chromablocks”). The above-described coding tree scheme may be equally orseparately applied to the luma block and chroma block of the current CU.Specifically, the luma and chroma blocks in one CTU may be partitionedinto the same block tree structure and, in this case, the tree structureis represented as SINGLE_TREE. Alternatively, the luma and chroma blocksin one CTU may be partitioned into separate block tree structures, and,in this case, the tree structure may be represented as DUAL_TREE. Thatis, when the CTU is partitioned into dual trees, the block treestructure for the luma block and the block tree structure for the chromablock may be separately present. In this case, the block tree structurefor the luma block may be called DUAL_TREE_LUMA, and the block treestructure for the chroma component may be called DUAL_TREE_CHROMA. For Pand B slice/tile groups, luma and chroma blocks in one CTU may belimited to have the same coding tree structure. However, for Islice/tile groups, luma and chroma blocks may have a separate block treestructure from each other. If the separate block tree structure isapplied, the luma CTB may be partitioned into CUs based on a particularcoding tree structure, and the chroma CTB may be partitioned into chromaCUs based on another coding tree structure. That is, this means that aCU in an I slice/tile group, to which the separate block tree structureis applied, may include a coding block of luma components or codingblocks of two chroma components and a CU of a P or B slice/tile groupmay include blocks of three color components (a luma component and twochroma components).

Although a quadtree coding tree structure with a nested multitype treehas been described, a structure in which a CU is partitioned is notlimited thereto. For example, the BT structure and the TT structure maybe interpreted as a concept included in a multiple partitioning tree(MPT) structure, and the CU may be interpreted as being partitionedthrough the QT structure and the MPT structure. In an example where theCU is partitioned through a QT structure and an MPT structure, a syntaxelement (e.g., MPT_split_type) including information on how many blocksthe leaf node of the QT structure is partitioned into and a syntaxelement (ex. MPT_split_mode) including information on which of verticaland horizontal directions the leaf node of the QT structure ispartitioned into may be signaled to determine a partitioning structure.

In another example, the CU may be partitioned in a different way thanthe QT structure, BT structure or TT structure. That is, unlike that theCU of the lower depth is partitioned into ¼ of the CU of the higherdepth according to the QT structure, the CU of the lower depth ispartitioned into ½ of the CU of the higher depth according to the BTstructure, or the CU of the lower depth is partitioned into ¼ or ½ ofthe CU of the higher depth according to the TT structure, the CU of thelower depth may be partitioned into ⅕, ⅓, ⅜, ⅗, ⅔, or ⅝ of the CU of thehigher depth in some cases, and the method of partitioning the CU is notlimited thereto.

The quadtree coding block structure with the multi-type tree may providea very flexible block partitioning structure. Because of the partitiontypes supported in a multi-type tree, different partition patterns maypotentially result in the same coding block structure in some cases. Inthe encoding apparatus and the decoding apparatus, by limiting theoccurrence of such redundant partition patterns, a data amount ofpartitioning information may be reduced.

For example, FIG. 8 shows redundant splitting patterns which may occurin binary tree splitting and ternary tree splitting. As shown in FIG. 8, continuous binary splitting 810 and 820 for one direction of two-steplevels have the same coding block structure as binary splitting for acenter partition after ternary splitting. In this case, binary treesplitting for center blocks 830 and 840 of ternary tree splitting may beprohibited. this prohibition is applicable to CUs of all pictures. Whensuch specific splitting is prohibited, signaling of corresponding syntaxelements may be modified by reflecting this prohibited case, therebyreducing the number of bits signaled for splitting. For example, asshown in the example shown in FIG. 8 , when binary tree splitting forthe center block of the CU is prohibited, a syntax elementmtt_split_cu_binary_flag specifying whether splitting is binarysplitting or ternary splitting is not signaled and the value thereof maybe derived as 0 by a decoding apparatus.

Overview of Chroma Format

Hereinafter, a chroma format will be described. An image may be encodedinto encoded data including a luma component (e.g., Y) array and twochroma component (e.g., Cb and Cr) arrays. For example, one pixel of theencoded image may include a luma sample and a chroma sample. A chromaformat may be used to represent a configuration format of the lumasample and the chroma sample, and the chroma format may be referred toas a color format.

In an embodiment, an image may be encoded into various chroma formatssuch as monochrome, 4:2:0, 4:2:2 or 4:4:4. In monochrome sampling, theremay be one sample array and the sample array may be a luma array. In4:2:0 sampling, there may be one luma sample array and two chroma samplearrays, each of the two chroma arrays may have a height equal to halfthat of the luma array and a width equal to half that of the luma array.In 4:2:2 sampling, there may be one luma sample array and two chromasample arrays, each of the two chroma arrays may have a height equal tothat of the luma array and a width equal to half that of the luma array.In 4:4:4 sampling, there may be one luma sample array and two chromasample arrays, and each of the two chroma arrays may have a height andwidth equal to those of the luma array.

FIG. 9 is a view illustrating a relative position according to anembodiment of a luma sample and a chroma block according to 4:2:0. FIG.10 is a view illustrating a relative position according to an embodimentof a luma sample and a chroma block according to 4:2:2. FIG. 11 is aview illustrating a relative position according to an embodiment of aluma sample and a chroma block according to 4:4:4. As shown in FIG. 9 ,in 4:2:0 sampling, a chroma sample may be located below a luma samplecorresponding thereto. As shown in FIG. 10 , in 4:2:2 sampling, a chromasample may be located to overlap a luma sample corresponding thereto. Asshown in FIG. 11 , in 4:4:4 sampling, both a luma sample and a chromasample may be located at an overlapping position.

A chroma format used in an encoding apparatus and a decoding apparatusmay be predetermined. Alternatively, a chroma format may be signaledfrom an encoding apparatus to a decoding apparatus to be adaptively usedin the encoding apparatus and the decoding apparatus. In an embodiment,the chroma format may be signaled based on at least one ofchroma_format_idc or separate_colour_plane_flag. At least one ofchroma_format_idc or separate_colour_plane_flag may be signaled throughhigher level syntax such as DPS, VPS, SPS or PPS. For example,chroma_format_idc and separate_colour_plane_flag may be included in SPSsyntax shown in FIG. 12 .

Meanwhile, FIG. 13 shows an embodiment of chroma format classificationusing signaling of chroma_format_idc and separate_colour_plane_flag.chroma_format_idc may be information specifying a chroma format applyingto an encoded image. separate_colour_plane_flag may specify whether acolor array is separately processed in a specific chroma format. Forexample, a first value (e.g., 0) of chroma_format_idc may specifymonochrome sampling. A second value (e.g., 1) of chroma_format_idc mayspecify 4:2:0 sampling. A third value (e.g., 2) of chroma_format_idc mayspecify 4:2:2 sampling. A fourth value (e.g., 3) of chroma_format_idcmay specify 4:4:4 sampling.

In 4:4:4, the following may apply based on the value ofseparate_colour_plane_flag. If the value of separate_colour_plane_flagis a first value (e.g., 0), each of two chroma arrays may have the sameheight and width as a luma array. In this case, a value ofChromaArrayType specifying a type of a chroma sample array may be setequal to chroma_format_idc. If the value of separate_colour_plane_flagis a second value (e.g., 1), luma, Cb and Cr sample arrays may beseparately processed and processed along with monochrome-sampledpictures. In this case, ChromaArrayType may be set to 0.

Overview of Intra Prediction Mode

Hereinafter, the intra prediction mode will be in greater detail. FIG.14 shows an intra prediction direction according to an embodiment. Inorder to capture any edge direction presented in natural video, as shownin FIG. 14 , the intra prediction mode may include two non-directionalintra prediction modes and 65 directional intra prediction modes. Thenon-directional intra prediction modes may include a planar intraprediction mode and a DC intra prediction mode, and the directionalintra prediction modes may include second to 66^(th) intra predictionmodes.

Meanwhile, the intra prediction mode may further include across-component linear model (CCLM) mode for chroma samples in additionto the above-described intra prediction modes. The CCLM mode may besplit into L_CCLM, T_CCLM, LT_CCLM according to whether left samples,upper samples or both thereof are considered for LM parameter derivationand may be applied only to a chroma component. For example, the intraprediction mode may be indexed according to the intra prediction modevalue as shown in the following table.

TABLE 2 Intra prediction mode Associated name 0 INTRA_PLANAR 1 INTRA_DC 2 . . . 66 INTRA_ANGULAR2 . . . INTRA_ANGULAR66 81 . . . 83INTRA_LT_CCLM, INTRA_L_CCLM, INTRA_T_CCLM

FIG. 15 shows an intra prediction direction according to anotherembodiment. Here, a dotted-line direction shows a wide angle modeapplied only to a non-square block. As shown in FIG. 15 , in order tocapture any edge direction presented in natural video, the intraprediction mode according to an embodiment may include twonon-directional intra prediction modes and 93 directional intraprediction modes. The non-directional intra prediction modes may includea planar intra prediction mode and a DC intra prediction mode, and thedirectional intra prediction modes may include Intra prediction modes 2to 80 to 1 to −14, as denoted by arrow of FIG. 15 . The planarprediction mode may be denoted by INTRA_PLANAR, and the DC predictionmode may be denoted by INTRA_DC. In addition, the directional intraprediction mode may be denoted by INTRA_ANGULAR−14 to INTRA_ANGULAR−1and INTRA_ANGULAR2 to INTRA_ANGULAR80. Meanwhile, the intra predictiontype (or the additional intra prediction mode) may include at least oneof LIP, PDPC, MRL, ISP or MIP. The intra prediction type may beindicated based on intra prediction type information, and the intraprediction type information may be implemented in various forms. Forexample, the intra prediction type information may include intraprediction type index information indicating one of the intra predictiontypes. As another example, the intra prediction type information mayinclude at least one of reference sample line information (e.g.,intra_luma_ref_idx) indicating whether the MRL is applied to the currentblock and, if applied, which reference sample line is used, ISP flaginformation (e.g., intra_subpartitions_mode_flag) indicating whether theISP is applied to the current block, ISP type information (e.g.,intra_subpartitions_split_flag) indicating the split type of thesub-partitions when the ISP is applied, flag information indicatingwhether PDPC is applied, flag information indicating whether LIP isapplied or MIP flag information indicating whether MIP is applied.

The intra prediction mode information and/or the intra prediction typeinformation may be encoded/decoded using a coding method described inthe present disclosure. For example, the intra prediction modeinformation and/or the intra prediction type information may beencoded/decoded based on a truncated (rice) binary code through entropycoding (e.g., CABAC, CAVLC).

When intra prediction is performed on a current block, prediction on aluma component block (luma block) of the current block and prediction ona chroma component block (chroma block) may be performed. In this case,the intra prediction mode for the chroma block may be set separatelyfrom the intra prediction mode for the luma block.

For example, the intra prediction mode for the chroma block may bespecified based on intra chroma prediction mode information, and theintra chroma prediction mode information may be signaled in the form ofan intra_chroma_pred_mode syntax element. For example, the intra chromaprediction mode information may represent one of a planar mode, a DCmode, a vertical mode, a horizontal mode, a derived mode (DM), and aCCLM mode. Here, the planar mode may specify intra prediction mode #0,the DC mode may specify intra prediction mode #1, the vertical mode mayspecify intra prediction mode #26, and the horizontal mode may specifyintra prediction mode #10. DM may also be referred to as a direct mode.The CCLM may also be referred to as an LM.

Meanwhile, the DM and the CCLM are dependent intra prediction modes forpredicting the chroma block using information on the luma block. The DMmay represent a mode in which the same intra prediction mode as theintra prediction mode for the luma component applies as the intraprediction mode for the chroma component. In addition, the CCLM mayrepresent an intra prediction mode using, as the prediction samples ofthe chroma block, samples derived by subsampling reconstructed samplesof the luma block and then applying α and β which are CCLM parameters tosubsampled samples in a process of generating the prediction block forthe chroma block.

Overview of MIP

A matrix based intra prediction (MIP) mode may also be referred to as anaffine linear weighted intra prediction (ALWIP) mode, a linear weightedintra prediction (LWIP) mode or a matrix weighted intra prediction(MWIP) mode. An intra prediction mode other than matrix based predictionmay be defined as a non-matrix based prediction mode. For example, thenon-matrix based prediction mode may be referred to as non-directionalintra prediction and directional intra prediction. Hereinafter, as theterm to refer to the non-matrix based prediction mode, an intraprediction mode or a normal intra prediction may be usedinterchangeably. Hereinafter, matrix based prediction may be referred toas an MIP mode.

When the MIP mode applies for the current block, i) neighboringreference samples on which an averaging step is performed may be used,ii) a matrix-vector-multiplication step may be performed, iii) ifnecessary, a horizontal/vertical interpolation may be further performed,thereby deriving prediction samples of the current block.

The averaging step may be performed by averaging the values ofneighboring samples. The averaging procedure may be performed by takingaveraging of each boundary and generating a total of four samplesincluding two top samples and two left samples when the width and widthof the current block are 4 in pixel units as shown in (a) of FIG. 16 andmay be performed by taking averaging of each boundary and generating atotal of eight samples including four top samples and four left sampleswhen the width and width of the current block are not 4 in pixel unitsas shown in (b) of FIG. 16 .

The matrix-vector-multiplication step may be performed by multiplying anaveraged sample by a matrix vector and then adding an offset vector,thereby generating a prediction signal for a subsampled pixel set of anoriginal block. The size of the matrix and the offset vector may bedetermined according to the width and width of the current block.

The horizontal/vertical interpolation step is a step of generating theprediction signal of an original block size from the subsampledprediction signal. As shown in FIG. 17 , the prediction signal of theoriginal block size may be generated by performing vertical andhorizontal interpolation using a subsampled prediction signal and aneighboring pixel value. FIG. 17 shows an embodiment of performing MIPprediction with respect to an 8×8 block. In case of the 8×8 block, asshown in (b) of FIG. 16 , a total of eight averaged samples may begenerated. By multiplying eight averaged samples by a matrix vector andadding an offset vector, as shown in (a) of FIG. 17, 16 sample valuesmay be generated an even-number coordinate position. Thereafter, asshown in (b) of FIG. 17 , vertical interpolation may be performed usingan average value of top samples of the current block. Thereafter, asshown in (c) of FIG. 17 , horizontal interpolation may be performedusing the left sample of the current block.

Intra prediction modes used for the MIP mode may be constructeddifferently from intra prediction modes used for the above-describedLIP, PDPC, MRL and ISP intra prediction or normal intra prediction. Theintra prediction mode for the MIP mode may be called an MIP intraprediction mode, an MIP prediction mode or an MIP mode. For example, amatrix and offset used for the matrix-vector-multiplication may bedifferently set according to the intra prediction mode for MIP. Here,the matrix may be called an (MIP) weight matrix, and the offset may becalled an (MIP) offset vector or (MIP) bias vector.

The above-described intra prediction type information may include an MIPflag (e.g., intra_mip_flag) specifying whether the MIP mode applies tothe current block. intra_mip_flag[x0] [y0] may specify whether thecurrent block is predicted in an MIP mode. For example, a first value(e.g., 0) of intra_mip_flag[x0][y0] may specify that the current blockis not predicted in the MIP mode. A second value (e.g., 1) ofintra_mip_flag[x0][y0] may specify that the current block is predictedin the MIP mode.

When intra_mip_flag[x0][y0] has a second value (e.g., 1), information onthe MIP mode may be further obtained from a bitstream. For example,intra_mip_mpm_flag[x0] [y0], intra_mip_mpm_idx[x0][y0] andintra_mip_mpm_remainder [x0][y0] syntax elements which are informationspecifying the MIP mode of the current block may be further obtainedfrom the bitstream. When an MIP prediction mode applies to the currentblock, an MPM list for MIP may be constructed, and theintra_mip_mpm_flag may specify whether the MIP mode for the currentblock is present in the MPM list for MIP (or MPM candidates). Theintra_mip_mpm_idx may specify the index of a candidate used as the MIPprediction mode of the current block among the candidates in the MPMlist, when the MIP prediction mode for the current block is present inthe MPM list for MIP (that is, when the value of intra_mip_mpm_flag is1). intra_mip_mpm_remainder may specify the MIP prediction mode of thecurrent block when the MIP prediction mode for the current block is notpresent in the MPM list for MIP (that is, when the value ofintra_mip_mpm_flag is 0), and specify any one of all MIP predictionmodes or specify any one of the remaining modes except for the candidatemode in the MPM list for MIP among all the MIP prediction modes as theMIP prediction mode of the current block.

Meanwhile, when intra_mip_flag[x0][y0] has a first value (e.g., 0),information on MIP may not be obtained from the bitstream and intraprediction information other than MIP may be obtained from thebitstream. In an embodiment, intra_luma_mpm_flag[x0][y0] specifyingwhether an MPM list for normal intra prediction is generated may beobtained from the bitstream.

When the intra prediction mode applies to the current block, an MPM listtherefor may be constructed, intra_luma_mpm_flag may specify an intraprediction mode for the current block is present in the MPM list (or MPMcandidates). For example, a first value (e.g., 0) of intra_luma_mpm_flagmay specify that the intra prediction mode of the current block is notpresent in the MPM list. A second value (e.g., 1) of intra_luma_mpm_flagmay specify that the intra prediction mode of the current block ispresent in the MPM list. When the value of intra_luma_mpm_flag is 1, theintra_luma_not_planar_flag may be obtained from the bitstream.

intra_luma_not_planar_flag may specify whether the intra prediction modeof the current block is a planar mode or not. For example, a first value(e.g., 0) of intra_luma_not_planar_flag may specify that the intraprediction mode of the current block is a planar mode. A second value(e.g., 1) of intra_luma_not_planar_flag may specify that the intraprediction mode of the current block is not a planar mode.

intra_luma_mpm_idx may be parsed and coded whenintra_luma_not_planar_flag is ‘true’ (that is, value 1). In anembodiment, a planar mode may always be included in the MPM list as acandidate. However, as described above, the planar mode may be excludedfrom the MPM list by first signaling intra_luma_not_planar_flag, and, inthis case, a unified MPM list may be constructed in the above-describedvarious intra prediction types (normal intra prediction, MRL, ISP, LIP,etc.). In this case, the number of candidates in the MPM list may bereduced to 5. intra_luma_mpm_idx may specify candidates used as theintra prediction mode of the current block among the candidates includedin the MPM list from which the planar mode is excluded.

Meanwhile, when the value of intra_luma_mpm_flag is 0, theintra_luma_mpm_remainder may be parsed/coded. intra_luma_mpm_remaindermay specify one of all the intra prediction modes as the intraprediction mode of the current block or may specify any one of theremaining modes except for the candidate modes in the MPM list as theintra prediction mode of the current block.

Overview of Palette Mode

Hereinafter, a palette mode (PLT mode) will be described. An encodingapparatus according to an embodiment may encode an image using a palettemode, and a decoding apparatus may decode an image using a palette modein a manner corresponding thereto. The palette mode may be called apalette encoding mode, an intra palette mode, an intra palette encodingmode, etc. The palette mode may be regarded as a type of intra encodingmode or may be regarded as one of intra prediction methods. However,similarly to the above-described skip mode, a separate residual valuefor the corresponding block may not be signaled.

In an embodiment, the palette mode may be used to improve encodingefficiency in encoding screen content which is an image generated by acomputer including a significant amount of text and graphics. Ingeneral, a local area of the image generated as screen content isseparated by sharp edges, and is expressed with a small number ofcolors. In order to utilize this characteristic, in the palette mode,samples for one block may be expressed by indices specifying a colorentry of the palette table.

To apply a palette mode, information on a palette table may be signaled.In an embodiment, the palette table may include an index valuecorresponding to each color. To signal the index value, palette indexprediction information may be signaled. The palette index predictioninformation may include an index value for at least a portion of apalette index map. In the palette index map, pixels of video data may bemapped to color indices of the palette table.

The palette index prediction information may include run valueinformation. For at least a portion of the palette index map, the runvalue information may associate a run value with an index value. One runvalue may be associated with an escape color index. The palette indexmap may be generated from the palette index prediction information. Forexample, at least a portion of the palette index map may be generated bydetermining whether to adjust the index value of the palette indexprediction information based on a last index value.

A current block in a current picture may be encoded or reconstructedaccording to the palette index map. When applying the palette mode, apixel value in a current coding unit may be expressed as a small set ofrepresentative color values. Such a set may be called a palette. Forpixels having a value close to a palette color, the palette index may besignaled. For pixels having a value which does not belong to (is out of)the palette, the corresponding pixels may be denoted by an escape symboland a quantized pixel value may be directly signaled. In this document,a pixel or a pixel value may be described as a sample.

In order to decode a block encoded in the palette mode, a decodingapparatus may decode a palette color and an index. The palette color maybe described in the palette table, and may be encoded using a palettetable coding tool. An escape flag may be signaled for each coding unit.The escape flag may specify whether an escape symbol is present in acurrent coding unit. If the escape symbol is present, the palette tablemay be increased by 1 unit (e.g., index unit) and a last index may bedesignated as an escape mode. The palette indices of all pixels for onecoding unit may configure the palette index map, and may be encodedusing a palette index map coding tool.

For example, in order to encode the palette table, a palette predictormay be maintained. The palette predictor may be initialized at a startpoint of each slice. For example, the palette predictor may be reset to0. For each entry of the palette predictor, a reuse flag specifyingwhether it is a portion of a current palette may be signaled. The reuseflag may be signaled using run-length coding of a value of 0.

Thereafter, numbers for new palette entries may be signaled using azero-order exponential Golomb code. Finally, component values for a newpalette entry may be signaled. After encoding a current coding unit, thepalette predictor may be updated using the current palette, and an entryfrom a previous palette predictor which is not reused in the currentpalette (until reaching an allowed maximum size) may be added to an endof a new palette predictor and this may be referred to as palettestuffing.

For example, in order to encode the palette index map, indices may beencoded using horizontal or vertical scan. A scan order may be signaledthrough a bitstream using palette_transpose_flag which is a parameterspecifying a scan direction. For example, when horizontal scan appliesto scan indices for samples in a current coding unit,palette_transpose_flag may have a first value (e.g., 0) and whenvertical scan applies, palette_transpose_flag may have a second value(e.g., 1). FIG. 18 shows an embodiment of horizontal scan and verticalscan according to an embodiment.

In addition, in an embodiment, the palette index may be encoded using an‘INDEX’ mode and a ‘COPY_ABOVE’ mode. Except for the case where the modeof the palette index is signaled for an uppermost row when horizontalscan is used, the case where the mode of the palette index is signaledfor a leftmost column when vertical scan is used, and the case where animmediately previous mode is ‘COPY_ABOVE’, the two modes may be signaledusing one flag.

In an ‘INDEX’ mode, the palette index may be explicitly signaled. For a‘INDEX’ mode and a ‘COPY_ABOVE’ mode, a run value specifying the numberof pixels encoded using the same mode may be signaled.

An encoding order for an index map may be set as follows. First, thenumber of index values for a coding unit may be signaled. This may beperformed after signaling of an actual index value for the entire codingunit using truncated binary coding. Both the number of indices and theindex values may be coded in a bypass mode. Through this, bypass binsrelated to the index may be grouped. Then, the palette mode (INDEX orCOPY_ABOVE) and the run value may be signaled using an interleavingmethod.

Finally, component escape values corresponding to escape samples for theentire coding unit may be mutually grouped and encoded in a bypass mode.last_run_type_flag which is an additional syntax element may be signaledafter signaling the index value. By using last_run_type_flag along withthe number of indices, signaling of a run value corresponding to a lastrun in the block may be skipped.

In an embodiment, a dual tree type, in which independent coding unitpartitioning is performed on a luma component and a chroma component,may be used for an I slice. The palette mode may apply to the lumacomponent and the chroma component individually or together. If the dualtree does not apply, the palette mode is applicable to all Y, Cb and Crcomponents.

Overview of IBC (Intra Block Copy) Mode

IBC prediction may be performed by the prediction unit of the imageencoding apparatus/image decoding apparatus. The IBC prediction may besimply called IBC. The IBC may be used for content image/moving imagesuch as game, for example, SCC (screen content coding). The IBCprediction is basically performed within a current picture but may beperformed similarly to inter prediction in that a reference block isderived within the current picture. That is, IBC may use at least one ofthe inter prediction techniques described in the present disclosure. Forexample, in IBC, at least one of the above-described motion information(motion vector) derivation methods may be used. At least one of theinter prediction techniques may be partially modified and used inconsideration of the IBC prediction. The IBC may refer to a currentpicture and thus may be referred to as current picture referencing(CPR).

For IBC, the image encoding apparatus may derive an optimal block vector(or motion vector) for a current block (e.g., CU) by performing blockmatching (BM). The derived block vector (or motion vector) may besignaled to the image decoding apparatus through a bitstream using amethod similar to signaling of motion information (motion vector) in theabove-described inter prediction. The image decoding apparatus mayderive a reference block for the current block within the currentpicture through the signaled block vector (motion vector) and derive aprediction signal (predicted block or prediction samples) for thecurrent block through this. Here, the block vector (or motion vector)may represent displacement from the current block to the reference blocklocated in an already reconstructed area in the current picture.Accordingly, the block vector (or motion vector) may be called adisplacement vector. Hereinafter, in IBC, the motion vector maycorrespond to the block vector or the displacement vector. The motionvector of the current block may include a motion vector (luma motionvector) for a luma component and a motion vector (chroma motion vector)for a chroma component. For example, the luma motion vector for anIBC-coded CU may be an integer sample unit (that is, integer precision).The chroma motion vector may also be clipped in integer sample units. Asdescribed above, IBC may use at least one of inter predictiontechniques, and, for example, the luma motion vector may beencoded/decoded using the above-described merge mode or MVP mode.

When the merge mode applies to a luma IBC block, a merge candidate listfor the luma IBC block may be constructed similarly to a merge candidatelist in an inter mode. However, in the case of the luma IBC block, atemporal neighboring block may not be used as a merge candidate.

When an MVP mode applies to the luma IBC block, an mvp candidate listfor the luma IBC block may be constructed similar to an mvp candidatelist in an inter mode. However, in the case of the luma IBC block, atemporal candidate block may not be used as an mvp candidate.

In IBC, a reference block is derived from an already reconstructed areawithin the current picture. In this case, in order to reduce memoryconsumption and complexity of the image decoding apparatus, only apredefined area of the already reconstructed area within the currentpicture may be referenced. The predefined area may include a current CTUin which the current block is included. By limiting a referenceablereconstructed area to the predefined area, an IBC mode may beimplemented in hardware using a local on-chip memory.

The image encoding apparatus for performing IBC may determine areference block having smallest RD cost by searching the predefinedarea, and derive a motion vector (block vector) based on the positionsof the reference block and the current block.

Whether IBC applies to the current block may be signaled as IBCperformance information at a CU level. Information on a signaling method(IBC MVP mode or IBC skip/merge mode) of a motion vector of a currentblock may be signaled. IBC performance information may be used todetermine the prediction mode of the current block. Accordingly, IBCperformance information may be included in the information on theprediction mode of the current block.

In the case of the IBC skip/merge mode, a merge candidate index may besignaled and used to specify a block vector to be used for prediction ofa current luma block among block vectors included in the merge candidatelist. In this case, the merge candidate list may include neighboringblocks encoded in IBC. The merge candidate list may include a spatialmerge candidate, and may be constructed not to include a temporal mergecandidate. In addition, the merge candidate list may further include anHMVP (history-based motion vector predictor) candidate and/or a pairwisecandidate.

In the case of the IBC MVP mode, a block vector difference value may beencoded using the same method as the motion vector difference value ofthe above-described inter mode. A block vector prediction method mayconstruct and use an mvp candidate list including two candidates as apredictor similar to the MVP mode of the inter mode. One of the twocandidates may be derived from a left neighboring block and the othermay be derived from a top neighboring block. In this case, only when theleft or top neighboring block is encoded in IBC, the candidate may bederived from the corresponding neighboring block. If the left or topneighboring block is not available, for example, if it is not encoded inIBC, a default block vector may be included in the mvp candidate list asa predictor. In addition, it is similar to the MVP mode of the intermode that information (e.g., flag) specifying one of two block vectorpredictors is signaled and used as candidate selection information. Themvp candidate list may include an HMVP candidate and/or a zero motionvector as a default block vector.

The HMVP candidate may be referred to as a history based MVP candidate,and an MVP candidate, merge candidate or block vector candidate usedbefore encoding/decoding of the current block may be stored in the HMVPlist as HMVP candidates. Thereafter, when the merge candidate list ormvp candidate list of the current block does not include a maximumnumber of candidates, a candidate stored in the HMVP list may be addedto the merge candidate list or mvp candidate list of the current blockas an HMVP candidate.

The pairwise candidate means a candidate derived by selecting twocandidates from among the candidates already included in the mergecandidate list of the current block according to a predetermined orderand averaging the selected two candidates.

Intra Prediction for Chroma Block

When intra prediction is performed on a current block, prediction for aluma component block (luma block) and prediction for a chroma componentblock (chroma block) of the current block may be performed, and, in thiscase, an intra prediction mode for the chroma block may be setseparately from an intra prediction mode for the luma block.

The intra prediction mode for the chroma block may be determined basedon the intra prediction mode of the luma block corresponding to thechroma block. FIG. 19 is a view illustrating an intra prediction modedetermination method of a chroma block according to an embodiment.

A method of determining an intra prediction mode of a chroma block by anencoding/decoding apparatus according to an embodiment will be describedwith reference to FIG. 19 . Hereinafter, the decoding apparatus will bedescribed and the description thereof may apply to the encodingapparatus without change.

According to the following description, the intra prediction modeIntraPredModeC[xCb][yCb] for the chroma block may be derived, and thefollowing parameters may be used in this process.

-   -   luma sample coordinates (xCb, yCb) specifying a relative        position of a top-left sample of a current chroma block with        respect to a position of a top-left luma sample of a current        picture    -   cbWidth specifying a width of a current coding block in a luma        sample unit    -   cbHeight specifying a height of a current coding block in a luma        sample unit

In addition, the following description may be used when a current sliceincluding a current chroma block is an I slice and a luma/chroma dualtree splitting structure applies. However, the following description isnot limited to the above example. For example, the following descriptionmay apply regardless of whether the current slice is an I slice, and thefollowing description is commonly applicable even when it is not a dualtree splitting structure.

First, the decoding apparatus may determine luma intra prediction modeinformation (e.g., lumaIntraPredMode) based on the prediction mode ofthe luma block corresponding to the current chroma block (S1910). Thisstep will be described in detail below.

Next, the decoding apparatus may determine chroma intra prediction modeinformation based on luma intra prediction mode information andadditional information (S1920). In an embodiment, the decoding apparatusmay determine a chroma intra prediction mode, based on a cclm_mode_flagparameter specifying whether to apply a CCLM prediction mode obtainedfrom a bitstream, a cclm_mode_idx parameter specifying a CCLM mode typeapplied when the CCLM prediction mode applies, an intra_chroma_pred_modeparameter specifying an intra prediction mode type applying to a chromasample and luma intra prediction mode information (e.g.,lumaIntraPredMode) and a table of FIG. 20 .

For example, the intra_chroma_pred_mode may specify one of a planarmode, a DC mode, a vertical mode, a horizontal mode, a DM (Derived Mode)and a CCLM (Cross-component linear model) mode. Here, the planar modemay specify Intra prediction mode 0, the DC mode may specify Intraprediction mode 1, the vertical mode may specify Intra prediction mode26, and the vertical mode may specify Intra prediction mode 10. DM mayalso be referred to as a direct mode. CCLM may also be referred to as anLM (linear model). The CCLM mode may include at least one of L_CCLM,T_CCLM or LT_CCLM.

Meanwhile, DM and CCLM are dependent intra prediction modes in which achroma block is predicted using information on a luma block. DM mayspecify a mode in which the same intra prediction mode as an intraprediction mode of a luma block corresponding to a current chroma blockapplies as the intra prediction mode for the chroma block. In the DMmode, the intra prediction mode of the current chroma block may bedetermined as the intra prediction mode specified by the luma intraprediction mode information.

In addition, CCLM may specify an intra prediction mode in which, in aprocess of generating a prediction block of a chroma block,reconstructed samples of a luma block are subsampled and then samplesderived by applying CCLM parameters a and R to the subsampled samplesare used as prediction samples of the chroma block.

Next, the decoding apparatus may map a chroma intra prediction modebased on a chroma format (S1930). The decoding apparatus according to anembodiment may map a chroma intra prediction mode X determined accordingto the table of FIG. 20 to a new chroma intra prediction mode Y based onthe table of FIG. 21 , only when the chroma format is 4:2:2 (e.g., whenthe value of chroma_format_idc is 2). For example, when the value of thechroma intra prediction mode determined according to the table of FIG.20 is 16, this may be mapped to Chroma intra prediction mode 14according to the mapping table of FIG. 21 .

Determination of Luma Intra Prediction Mode Information

Hereinafter, step S1910 of determining luma intra prediction modeinformation (e.g., lumaIntraPredMode) will be described in greaterdetail. FIG. 22 is a flowchart illustrating a method of determining lumaintra prediction mode information by a decoding apparatus.

First, the decoding apparatus may identify whether an MIP mode appliesto the luma block corresponding to the current chroma block (S2210).When the MIP mode applies to the luma block corresponding to the currentchroma block, the decoding apparatus may set the value of luma intraprediction mode information to an INTRA_PLANAR mode (S2220).

Meanwhile, when the MIP mode does not apply to the luma blockcorresponding to the current chroma block, the decoding apparatus mayidentify whether an IBC mode or a PLT mode applies to the luma blockcorresponding to the current chroma block (S2230).

When the IBC mode or the PLT mode applies to the luma blockcorresponding to the current chroma block, the decoding apparatus mayset the value of the luma intra prediction mode information to anINTRA_DC mode (S2240).

On the other hand, when the IBC mode or the PLT mode does not apply tothe luma block corresponding to the current chroma block, the decodingapparatus may set the value of luma intra prediction mode information tothe intra prediction mode of the luma block corresponding to the currentchroma block (S2250).

In the determination process of the luma intra prediction modeinformation shown in FIG. 22 , various methods are applicable in orderto specify the luma block corresponding to the current chroma block. Asdescribed above, the top-left sample position of the current chromasample may be expressed by relative coordinates of a luma sample spacedapart from the position of the top-left luma sample of the currentpicture. Hereinafter, a method of specifying a luma block correspondingto a chroma block in this background will be described.

FIG. 23 is a view illustrating a first embodiment of referring to a lumasample position in order to identify a prediction mode of a luma blockcorresponding to a current chroma block. Hereinafter, since steps S2310to S2350 correspond to steps S2210 to S2250 of FIG. 22 , only adifference will be described.

In the first embodiment of FIG. 23 , a first luma sample positioncorresponding to a top-left sample position of the current chroma blockand a second luma sample position determined based on the top-leftsample position of the current chroma block and the width and height ofa current luma block are referred to. Here, the first luma sampleposition may be (xCb, yCb). In addition, the second luma sample positionmay be (xCb+cbWidth/2, yCb+cbHeight/2).

More specifically, in step S2310, in order to identify whether the MIPmode applies to the luma block corresponding to the current chromablock, the first luma sample position may be identified. Morespecifically, whether the value of a parameter intra_mip_flag[xCb][yCb]specifying whether to apply the MIP mode identified at the first lumasample position is 1 may be identified. A first value (e.g., 1) ofintra_mip_flag[xCb][yCb] may specify that the MIP mode applies at a[xCb][yCb] sample position.

In addition, in step S2330, a first luma sample position may beidentified in order to identify whether an IBC mode or a palette modehas applied to the luma block corresponding to the current chroma block.More specifically, whether the value of a prediction mode parameterCuPredMode[0][xCb][yCb] of a luma block identified at the first lumasample position is a value (e.g., MODE_IBC) specifying an IBC mode or avalue (e.g., MODE_PLT) specifying a palette mode may be identified.

In addition, in step S2350, in order to set luma intra prediction modeinformation to the intra prediction mode information of the luma blockcorresponding to the current chroma block, a second luma sample positionmay be identified. More specifically, the value of a parameterIntraPredModeY[xCb+cbWidth/2] [yCb+cbHeight/2] specifying a luma intraprediction mode identified at a second luma sample position may beidentified.

However, in the case of the first embodiment, in order to determine theintra prediction mode of the current chroma block, both the first lumasample position and the second luma sample position are considered. Whenonly one luma sample position is considered, encoding and decodingcomplexity may decrease compared to the case where two sample positionsare considered.

Hereinafter, a second embodiment and a third embodiment considering onlyone luma sample position will be described. FIGS. 24 and 25 are viewsillustrating a second embodiment and a third embodiment of referring aluma sample position in order to identify the prediction mode of theluma block corresponding to the current chroma block. Hereinafter, sincesteps S2410 to S2450 and steps S2510 to S2550 correspond to steps S2210to S2250 of FIG. 22 , only a difference will be described.

In the second embodiment of FIG. 24 , the second luma sample positiondetermined based on the top-left sample position of the current chromablock and the width and height of the current luma block may be referredto. Here, the second luma sample position may be (xCb+cbWidth/2,yCb+cbHeight/2). Therefore, in the second embodiment, a prediction valueof a luma sample corresponding to a center position (xCb+cbWidth/2,yCb+cbHeight/2) of the luma block corresponding to the current chromablock may be identified. In an embodiment, when the luma block has evennumbers of columns and rows, the center position may specify abottom-right sample position of four central samples of the luma block.

More specifically, in step S2410, in order to identify whether the MIPmode has applied to the luma block corresponding to the current chromablock, the second luma sample position may be identified. Morespecifically, whether the value of a parameterintra_mip_flag[xCb+cbWidth/2] [yCb+cbHeight/2] specifying whether toapply the MIP identified at the second luma sample position is 1 may beidentified.

In addition, in step S2430, in order to identify whether the IBC orpalette mode has applied to the luma block corresponding to the currentchroma block, the second luma sample position may be identified. Morespecifically, whether the value of a prediction mode parameterCuPredMode[0][xCb+cbWidth/2][yCb+cbHeight/2] of the luma blockidentified at the second luma sample position is a value (e.g.,MODE_IBC) specifying the IBC mode or a value (e.g., MODE_PLT) specifyingthe palette mode may be identified.

In addition, in step S2450, in order to set luma intra prediction modeinformation to the intra prediction mode information of the luma blockcorresponding to the current chroma block, the second luma sampleposition may be identified. More specifically, the value of a parameterIntraPredModeY[xCb+cbWidth/2][yCb+cbHeight/2] specifying a luma intraprediction mode identified at the second luma sample position may beidentified.

In the third embodiment of FIG. 25 , the first luma sample positioncorresponding to the top-left sample position of the current chromablock may be referred to. Here, the first luma sample position may be(xCb, yCb). Therefore, in the third embodiment, the prediction value ofthe luma sample corresponding to the top-left sample position (xCb, yCb)of the luma block corresponding to the current chroma block may beidentified. In an embodiment, when the luma block has even numbers ofcolumns and rows,

More specifically, in step S2510, in order to identify whether the MIPmode has applied to the luma block corresponding to the current chromablock, the first luma sample position may be identified. Morespecifically, whether the value of a parameter intra_mip_flag[xCb][yCb]specifying whether to apply the MIP mode identified at the first lumasample position is 1 may be identified.

In addition, in step S2530, the first luma sample position may beidentified in order to identify whether the IBC or palette mode hasapplied to the luma block corresponding to the current chroma block.More specifically, whether the value of the prediction mode parameterCuPredMode[0][xCb] [yCb] of the luma block identified at the first lumasample position is a value (e.g., MODE_IBC) specifying the IBC mode or avalue (e.g., MODE_PLT) specifying the palette mode may be identified.

In addition, in step S2550, in order to set luma intra prediction modeinformation to the intra prediction mode information of the luma blockcorresponding to the current chroma block, the first luma sampleposition may be identified. More specifically, the value of a parameterIntraPredModeY[xCb][yCb] specifying the luma intra prediction modeidentified at the first luma sample position may be identified.

Encoding and Decoding Method

Hereinafter, a method of performing encoding by an encoding apparatusand a method of performing decoding by a decoding apparatus according toan embodiment using the above-described method will be described withreference to FIG. 26 . The encoding apparatus according to an embodimentmay include a memory and at least one processor and may perform thefollowing method by the at least one processor. In addition, thedecoding apparatus according to an embodiment may include a memory andat least one processor and may perform the following method by the atleast one processor. Although operation of the decoding apparatus willbe described below for convenience of description, the followingdescription is equally applicable to the encoding apparatus.

First, the decoding apparatus may identify a current chroma block bysplitting an image (S2610). Next, the decoding apparatus may identifywhether a matrix based intra prediction mode applies to a first lumasample position corresponding to the current chroma block (S2620). Here,the first luma sample position may be determined based on at least oneof the width or height of the luma block corresponding to the currentchroma block. For example, the first luma sample position may bedetermined based on a top-left sample position of the luma blockcorresponding to the current chroma block, the width of the luma blockand the height of the luma block.

Next, when the matrix based intra prediction mode does not apply, thedecoding apparatus may identify whether a predetermined prediction modeapplies to a second luma sample position corresponding to the currentchroma block (S2630). Here, the second luma sample position may bedetermined based on at least one of the width or height of the lumablock corresponding to the current chroma block. For example, the secondluma sample position may be determined based on the top-left sampleposition of the luma block corresponding to the current chroma block,the width of the luma block and the height of the luma block.

Next, when the predetermined prediction mode does not apply, thedecoding apparatus may determine the intra prediction mode candidate ofthe current chroma block based on an intra prediction mode applying to athird luma sample position corresponding to the current chroma block(S2640). Here, the predetermined prediction mode may be an IBC (IntraBlock Copy) mode or a palette mode.

Meanwhile, the first luma sample position may be the same as the thirdluma sample position. Alternatively, the second luma sample position maybe the same as the third luma sample position. Alternatively, the firstluma sample position, the second luma sample position and the third lumasample position may be the same.

Alternatively, the first luma sample position may be a center positionof the luma block corresponding to the current chroma block. Forexample, the x component position of the first luma sample position maybe determined by adding half the width of the luma block to the xcomponent position of the top-left sample of the luma blockcorresponding to the current chroma block, and the y component positionof the first luma sample position may be determined by adding half theheight of the luma block to the y component position of the top-leftsample of the luma block corresponding to the current chroma block.

Alternatively, the first luma sample position, the second luma sampleposition and the third luma sample position may be determined based onthe top-left sample position of the luma block corresponding to thecurrent chroma block, the width of the luma block and the height of theluma block, respectively.

Application Embodiment

While the exemplary methods of the present disclosure described aboveare represented as a series of operations for clarity of description, itis not intended to limit the order in which the steps are performed, andthe steps may be performed simultaneously or in different order asnecessary. In order to implement the method according to the presentdisclosure, the described steps may further include other steps, mayinclude remaining steps except for some of the steps, or may includeother additional steps except for some steps.

In the present disclosure, the image encoding apparatus or the imagedecoding apparatus that performs a predetermined operation (step) mayperform an operation (step) of confirming an execution condition orsituation of the corresponding operation (step). For example, if it isdescribed that predetermined operation is performed when a predeterminedcondition is satisfied, the image encoding apparatus or the imagedecoding apparatus may perform the predetermined operation afterdetermining whether the predetermined condition is satisfied.

The various embodiments of the present disclosure are not a list of allpossible combinations and are intended to describe representativeaspects of the present disclosure, and the matters described in thevarious embodiments may be applied independently or in combination oftwo or more.

Various embodiments of the present disclosure may be implemented inhardware, firmware, software, or a combination thereof. In the case ofimplementing the present disclosure by hardware, the present disclosurecan be implemented with application specific integrated circuits(ASICs), Digital signal processors (DSPs), digital signal processingdevices (DSPDs), programmable logic devices (PLDs), field programmablegate arrays (FPGAs), general processors, controllers, microcontrollers,microprocessors, etc.

In addition, the image decoding apparatus and the image encodingapparatus, to which the embodiments of the present disclosure areapplied, may be included in a multimedia broadcasting transmission andreception device, a mobile communication terminal, a home cinema videodevice, a digital cinema video device, a surveillance camera, a videochat device, a real time communication device such as videocommunication, a mobile streaming device, a storage medium, a camcorder,a video on demand (VoD) service providing device, an OTT video (over thetop video) device, an Internet streaming service providing device, athree-dimensional (3D) video device, a video telephony video device, amedical video device, and the like, and may be used to process videosignals or data signals. For example, the OTT video devices may includea game console, a blu-ray player, an Internet access TV, a home theatersystem, a smartphone, a tablet PC, a digital video recorder (DVR), orthe like.

FIG. 27 is a view showing a contents streaming system, to which anembodiment of the present disclosure is applicable.

As shown in FIG. 27 , the contents streaming system, to which theembodiment of the present disclosure is applied, may largely include anencoding server, a streaming server, a web server, a media storage, auser device, and a multimedia input device.

The encoding server compresses contents input from multimedia inputdevices such as a smartphone, a camera, a camcorder, etc. into digitaldata to generate a bitstream and transmits the bitstream to thestreaming server. As another example, when the multimedia input devicessuch as smartphones, cameras, camcorders, etc. directly generate abitstream, the encoding server may be omitted.

The bitstream may be generated by an image encoding method or an imageencoding apparatus, to which the embodiment of the present disclosure isapplied, and the streaming server may temporarily store the bitstream inthe process of transmitting or receiving the bitstream.

The streaming server transmits the multimedia data to the user devicebased on a user's request through the web server, and the web serverserves as a medium for informing the user of a service. When the userrequests a desired service from the web server, the web server maydeliver it to a streaming server, and the streaming server may transmitmultimedia data to the user. In this case, the contents streaming systemmay include a separate control server. In this case, the control serverserves to control a command/response between devices in the contentsstreaming system.

The streaming server may receive contents from a media storage and/or anencoding server. For example, when the contents are received from theencoding server, the contents may be received in real time. In thiscase, in order to provide a smooth streaming service, the streamingserver may store the bitstream for a predetermined time.

Examples of the user device may include a mobile phone, a smartphone, alaptop computer, a digital broadcasting terminal, a personal digitalassistant (PDA), a portable multimedia player (PMP), navigation, a slatePC, tablet PCs, ultrabooks, wearable devices (e.g., smartwatches, smartglasses, head mounted displays), digital TVs, desktops computer, digitalsignage, and the like.

Each server in the contents streaming system may be operated as adistributed server, in which case data received from each server may bedistributed.

The scope of the disclosure includes software or machine-executablecommands (e.g., an operating system, an application, firmware, aprogram, etc.) for enabling operations according to the methods ofvarious embodiments to be executed on an apparatus or a computer, anon-transitory computer-readable medium having such software or commandsstored thereon and executable on the apparatus or the computer.

INDUSTRIAL APPLICABILITY

The embodiments of the present disclosure may be used to encode ordecode an image.

1-15. (canceled)
 16. An image decoding method performed by an imagedecoding apparatus, the image decoding method comprising: identifying acurrent chroma block by splitting an image; determining a tree type ofthe current chroma block; identifying whether a matrix based intraprediction mode applies to a first luma sample position corresponding tothe current chroma block, based on the tree type of the current chromablock being a dual tree; identifying whether a predetermined predictionmode applies to a second luma sample position corresponding to thecurrent chroma block, based on the matrix based intra prediction modenot being applied; and determining an intra prediction mode candidate ofthe current chroma block based on an intra prediction mode applying to athird luma sample position corresponding to the current chroma block,based on the predetermined prediction mode not being applied.
 17. Theimage decoding method of claim 16, wherein the first luma sampleposition is determined based on at least one of a width or height of aluma block corresponding to the current chroma block.
 18. The imagedecoding method of claim 16, wherein the first luma sample position isdetermined based on a top-left sample position of a luma blockcorresponding to the current chroma block, a width of the luma block anda height of the luma block.
 19. The image decoding method of claim 18,wherein the first luma sample position is the same as the third lumasample position.
 20. The image decoding method of claim 16, wherein thesecond luma sample position is determined based on at least one of awidth or height of a luma block corresponding to the current chromablock.
 21. The image decoding method of claim 16, wherein thepredetermined prediction mode is an IBC (intra block copy) mode or apalette mode.
 22. The image decoding method of claim 16, wherein thesecond luma sample position is determined based on a top-left sampleposition of a luma block corresponding to the current chroma block, awidth of the luma block and a height of the luma block.
 23. The imagedecoding method of claim 22, wherein the second luma sample position isthe same as the third luma sample position.
 24. The image decodingmethod of claim 16, wherein the first luma sample position, the secondluma sample position and the third luma sample position are the same.25. The image decoding method of claim 24, wherein the first luma sampleposition is a center position of a luma block corresponding to thecurrent chroma block.
 26. The image decoding method of claim 24, whereinan x component position of the first luma sample position is determinedby adding half the width of the luma block to an x component position ofa top-left sample of a luma block corresponding to the current chromablock, and wherein a y component position of the first luma sampleposition is determined by adding half the height of the luma block to ay component position of the top-left sample of the luma blockcorresponding to the current chroma block.
 27. The image decoding methodof claim 24, wherein the first luma sample position, the second lumasample position and the third luma sample position are determined basedon a top-left sample position of a luma block corresponding to thecurrent chroma block, a width of the luma block and a height of the lumablock, respectively.
 28. An image encoding method performed by an imageencoding apparatus, the image encoding method comprising: identifying acurrent chroma block by splitting an image; identifying whether a matrixbased intra prediction mode applies to a first luma sample positioncorresponding to the current chroma block, based on a tree type of thecurrent chroma block being a dual tree; identifying whether apredetermined prediction mode applies to a second luma sample positioncorresponding to the current chroma block, based on the matrix basedintra prediction mode not being applied; and determining an intraprediction mode candidate of the current chroma block based on an intraprediction mode applying to a third luma sample position correspondingto the current chroma block, based on the predetermined prediction modenot being applied.
 29. A method of transmitting a bitstream generated byan image encoding method, the image encoding method comprising:identifying a current chroma block by splitting an image; identifyingwhether a matrix based intra prediction mode applies to a first lumasample position corresponding to the current chroma block, based on atree type of the current chroma block being a dual tree; identifyingwhether a predetermined prediction mode applies to a second luma sampleposition corresponding to the current chroma block, based on the matrixbased intra prediction mode not being applied; and determining an intraprediction mode candidate of the current chroma block based on an intraprediction mode applying to a third luma sample position correspondingto the current chroma block, based on the predetermined prediction modenot being applied.
 30. A non-transitory computer-readable recordingmedium storing a bitstream generated by the image encoding method ofclaim 28.